﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Own Smtp</title>
<!-- start: CSS -->
<link href="/content/css/style.default.css" rel="stylesheet">
<link href="/content/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/content/css/own.css">
<!-- end: CSS -->

<!-- Latest compiled and minified JavaScript -->
    <script src="/content/js/jquery-2.1.4.min.js"></script>
    <script src="/content/js/bootstrap.min.js"></script>
    <script src="/content/js/ownplugin.js"></script>

<script>
	var jsonData;
$(document).powerTimer({
intervalAfter: 10000,
func: function() {
$.getJSON( "/notifications.json", function( response ) {
    jsonData = response;
	$("#lognotify").html(jsonData.LogNotify)
	$("#mailnotify").html(jsonData.MailNotify)
	$("#version").html("Ownsmtp " + jsonData.OwnVersion)
	//console.log(jsonData.MailNotify);
	//console.log(location);
	//{"MailNotify":0,"LogNotify":6,"Uptime":{"Day":0,"Hour":0,"Min":27,"Sec":46}}
	if (location.pathname == "/")
	{
	//$("#uptime").html(jsonData.Uptime);
	$("#uptime").html("Day:" + jsonData.Uptime.Day + " Hour:" +jsonData.Uptime.Hour + " Min:" + jsonData.Uptime.Min +" Sec:" + jsonData.Uptime.Sec);
	}

});

},
});
$(function(){
    $('#lognotify').click(function(e) {  
      console.log("lognotify");
    });
    $('#mailnotify').click(function(e) {  
      console.log("mailnotify");
    });
	
	
// Tooltip
   jQuery('.tooltips').tooltip({ container: 'body'});

   // Popover
   jQuery('.popovers').popover();

   // Show panel buttons when hovering panel heading
   jQuery('.panel-heading').hover(function() {
      jQuery(this).find('.panel-btns').fadeIn('fast');
   }, function() {
      jQuery(this).find('.panel-btns').fadeOut('fast');
   });

   // Close Panel
   jQuery('.panel .panel-close').click(function() {
      jQuery(this).closest('.panel').fadeOut(200);
      return false;
   });
});
</script>
</head>
<body>
    <div class="content">
        <div class="row">
            <div class="col-lg-12">
                <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                    <div class="container-fluid">
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                                <span class="sr-only">Toggle navigation</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand" href="/">
                                <img alt="OWN SMTP" src="/content/img/logo-48x48.png">
                            </a>
                        </div>
                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav">
                                <li><a href="/messages">Messages</a>
                                </li>
                                <li><a href="/logs">Logs</a>
                                </li>
                            </ul>
                            
					<ul class="nav navbar-nav navbar-right">
							<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown"><b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li><a href="/settings"><i class="fa fa-cog"></i> Settings</a></li>
							<li><a href="/backups"><i class="fa fa-clipboard"></i> Backups</a></li>
							<li><a href="/maintenance"><i class="fa  fa-chain"></i> Maintenance </a></li>
							<li class="divider"></li>
							<li><a href="#"><i class="fa fa-sign-out"></i> Logout</a></li>
						</ul>
					</li>
					</ul>
                            <ul class="nav navbar-nav navbar-right">
                                <li>
                                    <a href="#bell">
                                        <i class="fa fa-bell-o"></i>
                                        <span id="lognotify" class="badge"></span>
                                    </a>
                                </li>
                            </ul>
                            <ul class="nav navbar-nav navbar-right">
                                <li>
                                    <a href="#mail">
                                        <i class="fa fa-envelope-o"></i>
                                        <span id="mailnotify" class="badge"></span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                        <!-- /.navbar-collapse -->
                    </div>
                </nav>
                <div class="time"></div>
                @Section['Content']
                <!--<div class="panel panel-default">
  <div class="panel-footer">Own Smtp<div class="pull-right">Joseph Philbert</div></div>
   
</div>-->
            </div>
        </div>
    </div>
    <!-- END CONTAINER  -->
	  <div class="navbar navbar-default navbar-fixed-bottom">
    <div class="container">
      <p class="navbar-text pull-left">© 2015 - <span id="version">Ownsmtp @Model.StatsData.OwnVer</span>
      </p>
      
      <a href="/maintenance" class="navbar-btn btn-danger btn pull-right">
      <span class="glyphicon glyphicon-star"></span>  Check for updates</a>
    </div>
    
    
  </div>
</body>

</html>